import React, { useState } from 'react';
import { View, Button } from 'react-native';
import Modal from 'react-native-modal';
import AudioRecorder from './AudioRecorder';

const SoundComponent = () => {
    const [isModalVisible, setModalVisible] = useState(false);

    const toggleModal = () => {
        setModalVisible(!isModalVisible);
    };

    return (
        <View>
            <AudioRecorder />
            <Button title="Show Message Box" onPress={toggleModal} />
            <Modal isVisible={isModalVisible}>
                <View>
                    <Button title="Hide" onPress={toggleModal} />
                    {/* Add any additional UI elements for the message box */}
                </View>
            </Modal>
        </View>
    );
};


export default SoundComponent;
